package com.sunrise.generico.entidade;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import lombok.Getter;
import lombok.Setter;

import com.sunrise.generico.entidade.iface.EntidadeNegocio;
import com.sunrise.generico.enums.ModalidadeBCICMS;
import com.sunrise.generico.enums.ModalidadeBCST;
import com.sunrise.generico.enums.MotivoDesoneracaoICMS;
import com.sunrise.generico.enums.OrigemProduto;

@Entity
@Table(name = "icms")
public class ICMS implements EntidadeNegocio {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1818738106635116131L;

	@Id
	@SequenceGenerator(name = "pk_sequence", sequenceName = "icms_id_seq", allocationSize = 1)
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "pk_sequence")
	@javax.persistence.Column
	@Getter
	@Setter
	private Long id;

	@Enumerated(EnumType.STRING)
	@Getter
	@Setter
	private OrigemProduto origemProduto;

	@OneToOne
	@Getter
	@Setter
	private SituacaoTributaria situacaoTributaria;

	@Enumerated(EnumType.ORDINAL)
	@Getter
	@Setter
	private ModalidadeBCICMS modBC;

	@Column(name = "pRedBC", length = 5, scale = 2)
	@Getter
	@Setter
	private BigDecimal perRedBC;

	@Column(name = "vBC", length = 15, scale = 2)
	@Getter
	@Setter
	private BigDecimal vBC;

	@Column(name = "pICMS", length = 5, scale = 2)
	@Getter
	@Setter
	private BigDecimal pICMS;

	@Column(name = "vICMS", length = 15, scale = 2)
	@Getter
	@Setter
	private BigDecimal vICMS;

	@Enumerated(EnumType.ORDINAL)
	@Getter
	@Setter
	private ModalidadeBCST modBCST;

	@Column(name = "pMVAST", length = 5, scale = 2)
	@Getter
	@Setter
	private BigDecimal pMVAST;

	@Column(name = "pRedBCST", length = 5, scale = 2)
	@Getter
	@Setter
	private BigDecimal perRedBCST;

	@Column(name = "vBCST", length = 15, scale = 2)
	@Getter
	@Setter
	private BigDecimal vBCST;

	@Column(name = "pICMSST", length = 5, scale = 2)
	@Getter
	@Setter
	private BigDecimal pICMSST;

	@Column(name = "vICMSST", length = 15, scale = 2)
	@Getter
	@Setter
	private BigDecimal vICMSST;

	@Column(name = "vBCSTRet", length = 15, scale = 2)
	@Getter
	@Setter
	private BigDecimal vBCSTRet;

	@Column(name = "vICMSSTRet", length = 15, scale = 2)
	@Getter
	@Setter
	private BigDecimal vICMSSTRet;

	@Column(name = "vBCSTDest", length = 15, scale = 2)
	@Getter
	@Setter
	private BigDecimal vBCSTDest;

	@Column(name = "vICMSSTDest", length = 15, scale = 2)
	@Getter
	@Setter
	private BigDecimal vICMSSTDest;

	@Enumerated(EnumType.ORDINAL)
	@Getter
	@Setter
	private MotivoDesoneracaoICMS motDesICMS;

	@Column(name = "pBCOp", length = 5, scale = 2)
	@Getter
	@Setter
	private BigDecimal pBCOp;

	@Column(name = "UFST")
	@Getter
	@Setter
	private String UFST;

	@Column(name = "pCredSN", length = 15, scale = 2)
	@Getter
	@Setter
	private BigDecimal pCredSN;

	@Column(name = "vCredICMSSN", length = 15, scale = 2)
	@Getter
	@Setter
	private BigDecimal vCredICMSSN;

	@OneToOne
	@Getter
	@Setter
	private Produto produto;

}
